package simonxianyu.boot.mybatis.dialect;

public abstract class Dialect {

	public static Dialect parse(Type databaseType) {
		switch (databaseType) {
			case MYSQL:
				return new MySql5Dialect();
			case ORACLE:
				return new OracleDialect();
			case SQLSERVER:
				return new SQLServer2005Dialect();
		}
		return null;
	}

	public enum Type {
		MYSQL, ORACLE, SQLSERVER
	}

	public abstract String getLimitString(String querySqlString, int offset, int limit);

	public abstract String getCountString(String querySqlString);

}
